function setOffset(offset)
{
	var element = document.getElementById('resultsoffset');
	if (offset >= 0)
		element.value = offset;
	else
		element.value = 0;
}

function nextPage()
{
	var element = document.getElementById('resultsoffset');
	element.value = element.value*1 + 10;
}

function previousPage()
{
	var element = document.getElementById('resultsoffset');
	var newvalue = element.value*1 - 10;
	if (newvalue < 0)
		element.value = 0;
	else
		element.value = newvalue;
}